<pre class="docs-method-signature"><code>link.reparent()</code></pre>
<p>Automatically find and set the best parent element for the link so that when the parent element is moved, the link and all its vertices are moved too. The best parent is determined as the <a href="#dia.Graph.prototype.getCommonAncestor">common ancestor</a> of the source and target elements of the link. Useful for hierarchical diagrams. See the <a href="#shapes.devs.hierarchical_diagrams">DEVS demo</a> on how this can be used.</p>
